﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace HomeData.BaseLibrary
{
    public abstract class BusinessObjectManagerBase<T, TSearch>
        where T : BusinessObjectBase, new()
        where TSearch : SearchParameters, new()
    {
        public virtual T MapObject(DataRow dataRow)
        {
            return default(T);
        }

        public virtual void SaveObject(T businessObject)
        {
        }

        public abstract List<BusinessObjectValidationError<T>> Validate(T businessObject);

        private DataSet SearchData(TSearch searchParameters)
        {
            string procedureName = "";

            return new DataSet();
        }

        public List<T> Search(TSearch searchParameters)
        {
            return new List<T>()
            {

            };
        }
    }
}
